﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SettingModule.Views.UserInfoSettingView
{
    public partial class UserInfoSettingView : UserControl,IUserInfoSettingView
    {
        public UserInfoSettingView()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(UserInfoSettingView_Loaded);
        }

        void UserInfoSettingView_Loaded(object sender, RoutedEventArgs e)
        {
            model.InitialData();
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            model.NewDetailSetting(Guid.NewGuid());
        }

      

        private void View_Click(object sender, RoutedEventArgs e)
        {
            Button btn=(Button)sender;

            model.ShowDetailSetting(new Guid(btn.Tag.ToString()));
        }

        #region IUserInfoSettingView Members

        public void SetModel(IUserInfoSettingPresentationModel model)
        {
            this.DataContext = model;
            this.model = model;
        }
        private IUserInfoSettingPresentationModel model;

        #endregion
    }
}
